﻿using UnityEngine;
using System.Collections;
using UnityEditor;

namespace ProjectTW.Foliage.Editor
{
    public class FoliageEditor
    {
        [MenuItem("Window/Foliage/FastApplyFoliage")]
        public static void ApplyFoliageInScene()
        {
            FoliageManager.InitializeOrCreate();

            Terrain[] terrains = Terrain.activeTerrains;
            for (int i = 0; i < terrains.Length; i++)
            {
                FoliageManager.Instance.InsertFoliageFromTerrain(terrains[i]);
            }
        }
    }
}
